﻿namespace JxcLite.Pages.Report;

/// <summary>
/// 商品利润表页面。
/// </summary>
[StreamRendering]
[Route("/rms/GoodsProfit")]
public class GoodsProfit : BaseTablePage<ProfitInfo>
{
    private IReportService Service;

    protected override async Task OnInitPageAsync()
    {
        await base.OnInitPageAsync();
        Service = await CreateServiceAsync<IReportService>();
        Table.OnQuery = Service.QueryProfitsAsync;
    }

    public async void Export() => await Table.ExportDataAsync();
}